expressage_dict = {
    "SFEXPRESS": "顺丰",
    "STO": "申通",
    "YTO": "圆通",
    "ZTO": "中通",
    "HTKY": ["汇通快递", "百世快递"],
    "YUNDA": "韵达",
    "JD": "京东",
    "EMS": "EMS",
    "ZTO56": "中通快运",
    "AAEWEB": "AAE",
    "ARAMEX": "Aramex",
    "DHL": ["内件	DHL", "际件	DHL_EN"],
    "DPEX": "DPEX",
    "DEXP": "D速",
    "EWE": "EWE",
    "FEDEX": "FedEx", "联邦快递"
                      "FEDEXIN": "FedEx国际",
    "PCA": "PCA",
    "TNT": "TNT",
    "UPS": "UPS",
    "ANJELEX": "安捷",
    "ANE": "安能",
    "ANEEX": "安能快递",
    "ANXINDA": "安信达",
    "EES": "百福东方",
    "BSKY": "百世快运",
    "FLYWAYEX": "程光",
    "DTW": "大田",
    "DEPPON": "德邦",
    "GCE": "飞洋",
    "PHOENIXEXP": "凤凰",
    "FTD": "富腾达",
    "GSD": "共速达",
    "GTO": "国通",
    "BLACKDOG": "黑狗",
    "HENGLU": "恒路",
    "HYE": "鸿远",
    "HQKY": "华企",
    "JOUST": "急先达",
    "TMS": "加运美",
    "JIAJI": "佳吉",
    "JIAYI": "佳怡",
    "KERRY": "嘉里物流",
    "HREX": "锦程快递",
    "PEWKEE": "晋越",
    "KKE": "京广",
    "JIUYESCM": "九曳",
    "KYEXPRESS": "跨越速运",
    "FASTEXPRESS": "快捷",
    "BLUESKY": "蓝天",
    "LTS": "联昊通",
    "LBEX": "龙邦",
    "YIMIDIDA": "壹米滴答",
    "RRS": "日日顺物流",
    "YXWL": "宇鑫物流",
    "DJ56": "东骏快捷",
    "FEDEX_GJ": "联邦快递国际",
    "AYCA": "澳邮专线",
    "CITY100": "城市100",
    "D4PX": "递四方速递",
    "GTSD": "广通",
    "HYLSD": "好来运快递",
    "JTKD": "捷特快递",
    "MB": "民邦快递",
    "MLWL": "明亮物流",
    "PANEX": "泛捷快递",
    "QXT": "全信通",
    "SAD": "赛澳递",
    "SDWL": "上大物流",
    "STWL": "速腾快递",
    "WJK": "万家康",
    "ZENY": "增益快递",
    "CAE": "民航",
    "ND56": "能达",
    "EFSPOST": "平安快递",
    "CHINZ56": "秦远物流",
    "QCKD": "全晨",
    "QFKD": "全峰",
    "APEX": "全一",
    "RFD": "如风达",
    "SFC": "三态",
    "SFWL": "盛丰",
    "SHENGHUI": "盛辉",
    "SDEX": "顺达快递",
    "SUNING": "苏宁",
    "SURE": "速尔",
    "HOAU": "天地华宇",
    "TTKDEX": "天天",
    "VANGEN": "万庚",
    "WANJIA": "万家物流",
    "EWINSHINE": "万象",
    "GZWENJIE": "文捷航空",
    "XBWL": "新邦",
    "XFEXPRESS": "信丰",
    "BROADASIA": "亚风",
    "YIEXPRESS": "宜送",
    "QEXPRESS": "易达通",
    "ETD": "易通达",
    "UC56": "优速",
    "CHINAPOST": "邮政包裹",
    "YFHEX": "原飞航",
    "YADEX": "源安达",
    "YCGWL": "远成",
    "YFEXPRESS": "越丰",
    "YTEXPRESS": "运通",
    "ZJS": "宅急送",
    "ZMKMEX": "芝麻开门",
    "COE": "中国东方",
    "CRE": "中铁快运",
    "ZTKY": "中铁物流",
    "CNPL": "中邮",
    "PJKD": "品骏快递",
    "INTMAIL": "邮政国际包裹",
    "PEISI": "配思航宇",
    "BDT": "八达通",
    "CJKD": "城际快递",
    "FKD": "飞康达",
    "HQSY": "环球速运",
    "JAD": "捷安达",
    "JGWL": "景光物流",
    "MK": "美快",
    "PADTF": "平安达腾飞快递",
    "QRT": "全日通快递",
    "RFEX": "瑞丰速递",
    "SAWL": "圣安物流",
    "ST": "速通物流",
    "SUBIDA": "速必达物流",
    "XJ": "新杰物流",
    "ZYWL": "中邮物流",
}


def get_key(value):
    """根据快递名字获取对应的快递的type值"""
    expressage_type = ''
    if type(value) == str:
        for k, v in expressage_dict.items():
            if type(v) == list:
                if value in v: expressage_type = k
            else:
                if value == v: expressage_type = k
    return expressage_type


def get_value():
    """获取所有快递的名称"""
    expressage_list = []
    for k, v in expressage_dict.items():
        if type(v) == list:
            expressage_list = [i for i in v]
        else:
            expressage_list.append(v)
    return expressage_list


if __name__ == '__main__':
    print(get_key("中通"))
    print(get_value())
